package merchant

import (
	"stock/controller"

	"stock/system/middleware"

	"github.com/gin-gonic/gin"
)

type Base struct {
	controller.Common
}

func (s Base) UserInfo(c *gin.Context) string {
	userInfo, err := middleware.ParseToken(c.Request.Header.Get("Authorization"))
	if err != nil {
		return ""
	}
	return userInfo.Uid
}
